#!/bin/bash
# 100内随机数猜对结束
num=$[RANDOM%100+1]

while  :
do
	read -p "1-100的数字请输入：" cai
	if [ $cai -eq $num ];then
		echo '恭喜'
		break

	elif [ $cai -gt $num ];then
		echo "大了"
	else [ $cai -le $num ]
		echo "小了"
	fi
done
